home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / acl / libacl.h
Encoding:
C/C++ Source or Header  |  2008-04-01  |  1.9 KB  |  67 lines

  1. /*
  2.   File: libacl.h
  3.  
  4.   (C) 1999, 2000 Andreas Gruenbacher, <a.gruenbacher@computer.org>
  5. */
  6.  
  7. #ifndef __ACL_LIBACL_H
  8. #define __ACL_LIBACL_H
  9.  
  10. #include <sys/acl.h>
  11.  
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15.  
  16. /* Flags for acl_to_any_text() */
  17.  
  18. /* Print NO, SOME or ALL effective permissions comments. SOME prints
  19.    effective rights comments for entries which have different permissions
  20.    than effective permissions.  */
  21. #define TEXT_SOME_EFFECTIVE        0x01
  22. #define TEXT_ALL_EFFECTIVE        0x02
  23.  
  24. /* Align effective permission comments to column 32 using tabs or
  25.    use a single tab. */
  26. #define TEXT_SMART_INDENT        0x04
  27.  
  28. /* User and group IDs instead of names. */
  29. #define TEXT_NUMERIC_IDS        0x08
  30.  
  31. /* Only output the first letter of entry types
  32.    ("u::rwx" instead of "user::rwx"). */
  33. #define TEXT_ABBREVIATE            0x10
  34.  
  35. /* acl_check error codes */
  36.  
  37. #define ACL_MULTI_ERROR        (0x1000)     /* multiple unique objects */
  38. #define ACL_DUPLICATE_ERROR    (0x2000)     /* duplicate Id's in entries */
  39. #define ACL_MISS_ERROR        (0x3000)     /* missing required entry */
  40. #define ACL_ENTRY_ERROR        (0x4000)     /* wrong entry type */
  41.  
  42. extern char *acl_to_any_text(acl_t acl, const char *prefix,
  43.                  char separator, int options);
  44. extern int acl_cmp(acl_t acl1, acl_t acl2);
  45. extern int acl_check(acl_t acl, int *last);
  46. extern acl_t acl_from_mode(mode_t mode);
  47. extern int acl_equiv_mode(acl_t acl, mode_t *mode_p);
  48. int acl_extended_file(const char *path_p);
  49. int acl_extended_fd(int fd);
  50. extern int acl_entries(acl_t acl);
  51. extern const char *acl_error(int code);
  52. extern int acl_get_perm(acl_permset_t permset_d, acl_perm_t perm);
  53.  
  54. /* Copying permissions between files */
  55. struct error_context;
  56. extern int perm_copy_file (const char *, const char *,
  57.                 struct error_context *);
  58. extern int perm_copy_fd (const char *, int, const char *, int,
  59.               struct error_context *);
  60.  
  61. #ifdef __cplusplus
  62. }
  63. #endif
  64.  
  65. #endif  /* __ACL_LIBACL_H */
  66.  
  67.